Mixtape.
Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet quisque rutrum.

How to Set Up Your Own AI Agent (Without Accidentally Destroying Everything)

So you read my last post and thought “I want one of those.” Good. But before you go full Tony Stark, let me save you from some of the mistakes I made. Because I made a lot of them.

Setting up Clawdbot isn’t hard. Fixing things after clawbot has broken them? That’s the hard part.

What You Actually Need

Let’s keep this simple.

– A computer. I use a MacBook Air. Nothing fancy. No server farm required.

– Node.js 22 or newer. If you don’t know what that is, Google “install node.js” and follow the first result. It takes 2 minutes.

– An API key from Anthropic (the company behind Claude). This is what powers the brain. You’ll need to sign up at anthropic.com and grab an API key.

– A messaging app you already use. Telegram is the easiest to start with. WhatsApp, Discord, Slack, iMessage all work too.

That’s it. No PhD required. No $10,000 cloud setup. Just a laptop and some curiosity. 

Note: I quickly moved beyond just  my laptop and let it use (yes, I let the AI use the resources of another piece of hardware as a slave) a gaming PC that I flattened and put Linux on as it has much more GPU & memory capacity

You can also setup a VPS (Virtual Private Server) for 20 bucks a month and accomplish the same outcome. 

USE YOUR PRIMARY MACHINE AT YOUR OWN RISK 

The Actual Setup (5 Minutes, Seriously)

Open your terminal and run:

“`

npm install -g clawdbot

“`

Then:

“`

clawdbot setup

“`

It walks you through everything. Asks for your API key, lets you pick a channel (start with Telegram), and gets the gateway running.

Once it’s up:

“`

clawdbot gateway

“`

That’s your agent. Running. Right now. On your machine.

Open Telegram, message your bot, and watch it respond. First time I did this I just sat there grinning like an idiot for about 10 minutes. It’s a moment.

The Config File (Where the Magic Lives)

Everything lives in `~/.clawdbot/clawdbot.json`. This is the brain config. You can set:

– Which AI model to use (Claude Opus for the smart stuff, cheaper models for grunt work)

– Which channels to connect (Telegram, WhatsApp, Discord, etc.)

– Who’s allowed to talk to it (important, more on this in a second)

– Memory settings, personality, the works

But here’s where I need to give you the first real warning.

 ⚠️ Permissions: The “I Gave My AI the Keys to the Kingdom” Problem

This is where most people (including me) screw up.

Clawdbot can do a lot. It can read files. Write files. Run commands. Execute code. Access your file system. Connect to servers. Spawn sub-agents that do all of the above independently.

When you first set it up, the temptation is to give it access to everything. Full permissions. Let it run wild. See what happens.

**Don’t do that.**

I’m speaking from experience here. Remember the 361,000 deleted records? That happened because my agent had full write access to a production database and I gave it a vague instruction. It did exactly what I asked. The problem was I asked wrong.

Here’s what I recommend:

**Start with read-only.** Let it look at things. Let it analyze. Let it report back. But don’t let it change anything until you trust the setup.

**Lock down file access.** You can configure which directories it can touch. Start narrow. Expand later. The config supports allowlists for exec commands. Use them.

**Be specific about who can talk to it.** In the config, use `allowFrom` to whitelist your phone number or user ID. Otherwise anyone who finds your bot can start issuing commands. That’s not a hypothetical concern.

“`json

{

  “channels”: {

    “telegram”: {

      “allowFrom”: [“your_telegram_id”]

    }

  }

}

“`

**Sub-agents inherit permissions.** This is the one that caught me off guard. When your main agent spawns a sub-agent to do a task, that sub-agent has the same access. If your main agent can delete files, so can every agent it creates. Think about that for a second.

The Workspace (Your Agent’s Home)

Clawdbot uses a workspace directory. By default it’s wherever you run it from, but I keep mine organized:

“`

~/clawd/

├── SOUL.md          # Your agent’s personality

├── AGENTS.md        # How it operates

├── USER.md          # Info about you

├── MEMORY.md        # Long-term memory

├── TOOLS.md         # Tool-specific notes

├── HEARTBEAT.md     # Periodic check-in config

└── memory/          # Daily memory files

    └── 2026-03-02.md

“`

**SOUL.md** is where it gets fun. This is literally your agent’s personality. Mine says things like “direct but warm”, “biased toward action”, “dry humor welcome.” It shapes how the agent communicates. Make it yours.

**MEMORY.md** is the long-term brain. Your agent wakes up fresh every session. Without memory files, it has amnesia every time. These files are its continuity. The difference between a useful agent and a frustrating one is usually the memory system.

Connecting to Telegram (The Easy Win)

Telegram is the fastest way to get started:

  1. Talk to @BotFather on Telegram
  2. Create a new bot, grab the token
  3. Add it to your config:

“`json

{

  “channels”: {

    “telegram”: {

      “token”: “your_bot_token_here”,

      “allowFrom”: [“your_telegram_user_id”]

    }

  }

}

“`

  1. Restart the gateway: `clawdbot gateway restart`

Now you can message your agent from your phone. Voice messages work too. It transcribes them automatically and responds.

The Sub-Agent Thing (Delegation, But With Guardrails)

This is where it gets powerful and where it gets dangerous in equal measure.

Your main agent can spawn sub-agents. Think of it like hiring freelancers. “Go research this.” “Go build this script.” “Go analyze this data.” Each one runs independently and reports back.Once the job is completed, they disappear, your primary AI is the only “persistent agent”.

I use different models for different jobs. Opus for the orchestrator (expensive but smart), Kimi for the worker bees (flat rate, good for volume). You can configure model routing in the config. Don’t try to be too smart out the gate, if you are using Claude, then spin up sonnet as the workers as its a native to anthropic model and will save token usage. 

But remember what I said about permissions. Every sub-agent your main agent creates can do everything your main agent can do. If you give the orchestrator access to your production server and it spawns a “cleanup” agent, that cleanup agent has production access too.

**Start with one agent. No sub-agents. Get comfortable. Then expand.**

I wish someone had told me that before the JSON corruption incident where two sub-agents tried to write to the same file at the same time and turned my task database into modern art. The lesson is, that details matter and your agent will not always advise you, so don’t assume too much.

Things That Will Go Wrong (And That’s Part Of The Deal)

Your agent will misunderstand you. It will be overly literal sometimes and weirdly creative other times. It will ping you too much until you tune the heartbeat settings. It will confidently tell you it completed a task that it absolutely did not complete. Trust … but verify.

This is normal. This is the process, This is the way?!

Every failure teaches you something about how to prompt better, how to structure tasks better, how to set up guardrails. The agent gets better because you get better at working with it. Cheat code: You can also ask the agent to create a better prompt for itself  😉 

My setup today is dramatically better than it was a month ago. Not because the AI got smarter (although it did), but because I learned how to better  work with it and gave it better guardrails. The memory system, the task tracking, the audit process, the file locking, the permission structure, all of that came from things going wrong. DOnt assume that because you’ve build a frontend dashboard that it will function like a SaaS product, it won’t. If may feel like it does for a while until it craps the bed and you realize that your agent has been duct taping it all together in its memory files … a painful lesson.

The Quick Start Checklist

  1.   ✅ Install: `npm install -g clawdbot`
  2.   ✅ Setup: `clawdbot setup` (API key + channel)
  3.   ✅ Start: `clawdbot gateway`
  4.   ✅ Lock down permissions (allowFrom, exec allowlists)
  5.   ✅ Create SOUL.md (give it personality)
  6.   ✅ Create MEMORY.md (give it continuity)
  7.   ✅ Start with read-only tasks
  8.   ✅ Graduate to write access slowly
  9.   ✅ Add sub-agents only when you trust the setup
  10. ✅ Back up your config before experimenting

One Last Thing

The biggest mistake I see people make isn’t a technical one. It’s one based on misaligned expectations.

Your agent isn’t going to be perfect on day one, or on day 100. It’s not going to replace your team. It’s not going to run your business while you sip cocktails on a beach. It’s a force multiplier, it is an invaluable tool. The day may be fast approaching where it will do all things, but that day is not today. 

What it will do is handle the stuff that eats your time. The monitoring. The data processing. The repetitive tasks. The things you forget to check. The 2 AM server crashes or jobs that time out.

Start small. Get one thing working. Then add another. That’s how you build something genuinely useful instead of a fancy demo that falls apart the second you try to use it for real work.

And for the love of all things holy, lock down your permissions first!